package com.sunsy.authserver.enums;

import com.sunsy.authserver.asert.IApiAssert;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @author 孙思远
 * @time 2020/6/30
 */
@Getter
@AllArgsConstructor
@ToString
public enum ErrorCode implements IApiAssert {
    APP_CLIENT_NOT_FOUNT(404, "未查询到该应用,无权获取token"),
    APP_CLIENT_CALLBACK_EXC(404, "回调地址错误"),
    CODE_EXC(404, "code已失效"),
    VERTIFI_EXC(500, "{}"),
    USER_NOT_FOUNT(404, "未获取到用户，请检查账号"),
    USER_STATUS_NOT_FOUNT(404, "未获取到用户状态，请联系管理员"),
    USER_STATUS_LOGIN(401, "用户当前状态为{0}，该状态不可登陆，请联系管理员"),
    USER_MOBILE_EXIST(500, "手机号已存在，请尝试登陆"),
    USER_EMAIL_EXIST(500, "邮箱已存在，请尝试使用邮箱登陆或更换登陆邮箱"),
    USER_STATUS_TIME(500, "{0}，请联系管理员"),
    USER_INSERT_EXC(500, "{0}"),
    PERMISSION_DENIED(401,"permission denied"),
    USER_TOKEN_DENIED(401,"用户已过期，请重新登录"),
    PASSWORD_EXC(401, "密码校验失败，请检查密码"),
    ACCESS_TOKEN_NOT_FOUNT(401, "未查询到access_token，请检查参数"),
    ACCESS_TOKEN_PARAMS(401, "access_token校验未通过"),
    REFRESH_TOKEN_EXC(401, "refresh_token校验失败，请重新获取token"),
    APP_SECRET_EXC(401, "密钥校验失败，请联系管理员校验密钥");
    private long code;
    private String msg;


}
